home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 2 / CD ACTUAL VOL 2.iso / share / os2 / utiles / recreate.cmd < prev    next >
Encoding:
Text File  |  1995-11-23  |  1.6 KB  |  39 lines

  1. /* ReCreate.CMD - restore lost desktop objects   */
  2. /* by Greg Czaja - July 29, 1992                 */
  3. /* the July 1992 REXXUTIL version is required    */
  4. /* look for REXX20 in Lib 17                     */
  5. Call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  6. Call SysLoadFuncs;
  7. SysBootDrive=Filespec('Drive',Value('COMSPEC',,'OS2ENVIRONMENT'));
  8. file_name=SysBootDrive||'\OS2\INI.RC';
  9. Say "The program will list all standard objects from your desktop"
  10. Say "Reply Y(es) if you want recreate given object"
  11. Say "      E(nd) to end the program"
  12. Say "      N(o) is the default if you press ENTER:"
  13. Do While Lines(file_name) > 0;
  14. line=Linein(file_name);
  15. If line='' Then Iterate;        /* skip blanks   */
  16. Parse Var line '"PM_InstallObject"' line;
  17. If line='' Then Iterate;        /* skip others   */
  18. Parse Var line '"'head'" 'line; /* get header    */
  19. Parse Var line '"'setup'"' .;   /* get setup string */
  20. Parse Var head title';'object';'location;
  21. Say title "- Yes/No/End ?";
  22. Pull reply ; 
  23. If Left(reply,1) ='E' Then Leave;
  24. If Left(reply,1) <> 'Y' Then Iterate;
  25. If SysCreateObject(object,title,location,setup,'Update') = 0
  26.    Then Say 'Error creating:' title;
  27.    Else Say title 'created !';
  28. End;
  29. rc=Stream(file_name,'C','Close');
  30. Return 0
  31. /*
  32. Did you delete Command Prompts ? Shreded your Shredder ?
  33. This program restores the standard WPS desktop objects on 2.0.
  34. It will preserve any current settings/objects you may have created
  35. and this is its advantage over the Alt-F1 or MAKEINI method.
  36. You will need the latest REXX fixes (REXX20 available in library 17)
  37. to make it run correctly.
  38. */
  39.